package com.accp.ssmoa.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.accp.ssmoa.pojo.Department;

public interface DepartmentMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Department record);

    int insertSelective(Department record);

    Department selectByPrimaryKey(@Param("id") Integer id);

    int updateByPrimaryKeySelective(Department record);

    int updateByPrimaryKey(Department record);
    
    //自定义数据访问
    List<Department> selectAllDepartments();
    
    //获取总数据数
    int getCount(@Param(value="parentmentId") Integer parentmentId);
    
    
    //分页
    List<Department> selectPageDepartments(@Param(value="startRow") Integer startRow,
    		@Param(value="pageSize") Integer pageSize,@Param(value="parentmentId") Integer parentmentId);
   
    //批量删除数据
    int deleteByIds(List<Integer> ids);
}